package com.ease.integration.hellobuddy.service.impl;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.ease.business.hellobuddy.service.HelloBuddyService;
import com.ease.business.hellobuddy.vo.Buddy;

@Path("/helloBuddyService")
// @Component
// @Scope("request")
// @Singleton
// @SuppressWarnings("unqualified-field-access")
public class HelloBuddyJerseyRestServiceImpl implements HelloBuddyService {

	private HelloBuddyService helloBuddyService;

	@Path("helloBuddy")
	@GET
	@Produces({ MediaType.APPLICATION_JSON })
	public Buddy helloBuddy(Buddy buddy) {
		return helloBuddyService.helloBuddy(buddy);
	}

	@Path("/helloWorld/{name}")
	@GET
	@Produces(MediaType.TEXT_PLAIN)
	public String helloWorld(@PathParam("name") String name) {
		return helloBuddyService.helloWorld(name);
	}

	/**
	 * @return the helloBuddyService
	 */
	public HelloBuddyService getHelloBuddyService() {
		return helloBuddyService;
	}

	/**
	 * @param helloBuddyService
	 *            the helloBuddyService to set
	 */
	public void setHelloBuddyService(HelloBuddyService helloBuddyService) {
		this.helloBuddyService = helloBuddyService;
	}

}
